package com.fly.feishu.api.service;

import com.fly.feishu.api.dto.WebAccessToken;
import com.fly.feishu.api.dto.WebAccessTokenCondition;
import com.fly.feishu.api.dto.WebRefreshTokenCondition;

/**
 * 飞书：身份验证（免登）服务
 */
public interface FeishuTokenService {

    /**
     * 根据code获取登录用户身份
     * @param condition
     * @return
     */
    WebAccessToken getWebAccessToken(WebAccessTokenCondition condition);

    /**
     * 刷新token
     * @param refreshToken {@linkplain WebRefreshTokenCondition#getRefreshToken()}
     * @return
     */
    WebAccessToken refreshWebAccessToken(String refreshToken);
}
